package com.breakfast.fun.ui.user;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.user.User;
import com.breakfast.fun.data.entity.user.Result;
import com.breakfast.fun.data.entity.user.coupon.Coupon;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by Administrator on 2016/8/23.
 */
public interface UserContract {

    interface Model extends BaseModel {
        Observable<User> getUserModel(@FieldMap Map<String, String> map);

        Observable<Result> getRecommendCodeModel(@FieldMap Map<String, String> map);

        Observable<Result> getCouponCountModel(@FieldMap Map<String, String> map);

        Observable<Result> getUnPayCount(@FieldMap Map<String, String> map);
    }

    interface View extends BaseView {
        void saveCode(String code);

        void refresh(User user);

        void stopRefresh();

        void setCouponCount(int couponCount);

        void setUnPayCount(int unPayCount);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void getUser();

        public abstract void getCode();

        public abstract void getCouponCount();

        public abstract void getUnPayCount();
    }
}
